home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Gold 2
/
Shareware Gold II - Volume 2 Number 1 - Wayzata Technology (7071) (1991).iso
/
business
/
flowdraw
/
copylib.bat
next >
Wrap
DOS Batch File
|
1989-11-11
|
3KB
|
96 lines
@ECHO OFF
GOTO EDIT
REM
REM ***************
REM * COPYLIB.BAT *
REM ***************
REM
REM This batch file creates a new library or adds libraries to an existing
REM library.
REM The format for using this batch file is COPYLIB LIBNAME LIBRARY1 LIBRARY2...
REM where LIBNAME is the name of the library without the .LIB extension
REM and LIBRARY1 LIBRARY2... are the names of up to 8 library files without
REM the .LIB extension
REM Example:
REM COPYLIB BIGLIB FLOCHART MISC HIPO
REM This command would create a library called BIGLIB.LIB which would
REM contain the libraries FLOCHART.LIB, MISC.LIB, and HIPO.LIB. If the
REM library BIGLIB already exists, this command would add the other
REM libraries to BIGLIB.
REM
:EDIT
IF %1.LIB==.LIB GOTO ERROR1
IF %2.LIB==.LIB GOTO ERROR1
IF NOT EXIST %2.LIB GOTO ERROR2
ECHO Starting library maintenance for %1.LIB
IF EXIST %1.LIB GOTO HAVELIB
ECHO We are creating a new library called %1.LIB
ECHO We will start the library with the following library files:
GOTO LIBRARY1
:HAVELIB
ECHO We will add the following library files to the library %1.LIB
:LIBRARY1
ECHO %2.LIB
:LIBRARY2
IF NOT EXIST %3.LIB ECHO *** %3.LIB not found ***
IF NOT EXIST %3.LIB GOTO LIBRARY3
ECHO %3.LIB
:LIBRARY3
IF NOT EXIST %4.LIB ECHO *** %4.LIB not found ***
IF NOT EXIST %4.LIB GOTO LIBRARY4
ECHO %4.LIB
:LIBRARY4
IF NOT EXIST %5.LIB ECHO *** %5.LIB not found ***
IF NOT EXIST %5.LIB GOTO LIBRARY5
ECHO %5.LIB
:LIBRARY5
IF NOT EXIST %6.LIB ECHO *** %6.LIB not found ***
IF NOT EXIST %6.LIB GOTO LIBRARY6
ECHO %6.LIB
:LIBRARY6
IF NOT EXIST %7.LIB ECHO *** %7.LIB not found ***
IF NOT EXIST %7.LIB GOTO LIBRARY7
ECHO %7.LIB
:LIBRARY7
IF NOT EXIST %8.LIB ECHO *** %8.LIB not found ***
IF NOT EXIST %8.LIB GOTO LIBRARY8
ECHO %8.LIB
:LIBRARY8
IF NOT EXIST %9.LIB ECHO *** %9.LIB not found ***
IF NOT EXIST %9.LIB GOTO ENDSYMS
ECHO %9.LIB
:ENDSYMS
@ECHO ON
PAUSE Is this correct? Press any key to continue, Ctrl-Break to quit.
@ECHO OFF
ECHO We are adding libraries to library %1.LIB
IF EXIST %1.LIB GOTO OLDLIB
COPY %2.LIB/B+%3.LIB+%4.LIB+%5.LIB+%6.LIB+%7.LIB+%8.LIB+%9.LIB %1.LIB/B
GOTO END
:OLDLIB
COPY %1.LIB/B+%2.LIB+%3.LIB+%4.LIB+%5.LIB+%6.LIB+%7.LIB+%8.LIB+%9.LIB
GOTO END
:ERROR1
ECHO We cannot process your COPYLIB command.
ECHO You may be using COPYLIB with the incorrect format.
ECHO The correct format for using COPYLIB is -
ECHO +--------------------------------------------------------+
ECHO : COPYLIB library-name library-name-1 library-name-2 ... :
ECHO +--------------------------------------------------------+
ECHO where
ECHO library-name is the file name of the library without the
ECHO .LIB extension
ECHO and
ECHO library-name-1 library-name-2 ...
ECHO are 1 to 8 file names for library files without the .LIB extension.
GOTO FINI
:ERROR2
ECHO We cannot process your COPYLIB command.
ECHO The 1st library file %2.LIB cannot be found.
ECHO Please check the directory for the correct file name.
GOTO FINI
:END
ECHO Library maintenance completed for library %1.LIB
:FINI